import Main from '../../views/Main'
import User from '../../components/User'
import Msg from '../../components/Msg'
import EditPaper from '../../views/EditPaper'
import Home from "../../views/Home";
import Search from "../../components/Search";
import UpdatePassword from "../../views/UpdatePassword";
import UpdateUserInfo from "../../views/UpdateUserInfo";
import Collections from "../../views/Collections";
import Login from "../../views/Login";
import Register from "../../views/Register";
import ImgList from "../../views/ResMgr/ImgList";
import ResMgr from "../../views/ResMgr/ResMgr";
import ResMgrMain from "../../views/ResMgr/ResMgrMain";
import PaperDetail from "../../views/PaperDetail";
export default {
    map: [
        {
            path: '/',
            name: 'index',
            redirect: '/main/home',
        },
        {
            path: '/main',
            name: 'main',
            component: Main,
            children: [
                {
                    path: 'user',
                    name: 'user',
                    components: {main_rv: User},
                },
                {
                    path: 'msg',
                    name: 'msg',
                    components: {main_rv: Msg},
                },
                {
                    path: 'home',
                    name: 'home',
                    components: {main_rv: Home},
                },
                {
                    path: 'search',
                    name: 'search',
                    components: {main_rv: Search},
                }

            ]
        },
        {
            path: '/editPaper',
            name: 'editPaper',
            components:{
                default:EditPaper
            }
        },
        {
            path: '/updatePassword',
            name: 'updatePassword',
            components: {default: UpdatePassword},
        },
        {
            path: '/updateUserInfo',
                name: 'updateUserInfo',
            components: {default: UpdateUserInfo},
        },
        {
            path: '/collections',
            name: 'collections',
            components: {default: Collections},
        },
        {
            path: '/login',
            name: 'login',
            components: {default: Login},
        },
        {
            path: '/register',
            name: 'register',
            components: {default: Register},
        },
        {
            path: '/resMgr',
            name: 'resMgr',
            components: {default: ResMgr},
            children: [
                {
                    path: '',
                    name: 'resMgrMain',
                    components: {resMgrRV: ResMgrMain},
                },
                {
                    path: 'imgs/:resDir',
                    name: 'imgs',
                    components: {resMgrRV: ImgList},
                    props:{
                        resMgrRV:true
                    }
                }
            ]
        },
        {
            path: '/paperDetail/:id',
            name: 'paperDetail',
            components: {default: PaperDetail},
            props:{default:true}
        }



    ]
}